Hello all,
I was hoping someone would be able to help. My issue is I have requirements nestled under varying "Object Levels" and I want to return the "Object Heading" corresponding to the second Object Level.
For Example: ID Level 2 Object Number TSC - 0001 1 TSC - 0010 1.1 TSC - 0011 1.1.1 The TSC shall... 1.1 TSC - 0100 1.2 TSC - 0101 1.2.1 TSC - 0110 1.2.1.1 The TSC shall... 1.2
string r = null
string s = null
string p = null
Object o = obj
string oh = o."Object Heading"
Object po = parent o
string isReq = o."Requirement"
if (isReq == "True") {
p = po."Object Heading"
//check if parent object heading is not empty
if (p != null) {
r = probeRichAttr_(po,"Object Number", false)
displayRich r " " s
}
}
What I have thus far simply returns the parent (of the given objects) Object Number, but I cant figure out how to write it so that the script will loop until it finds the corresponding level 2 object heading and return that one.
Any help will be much appreciated
Thanks Mike mwelch1280 - Fri Sep 18 10:29:47 EDT 2015 |
Re: DXL attribute that returns "Object Level" = 2 Something like
|
Re: DXL attribute that returns "Object Level" = 2 PekkaMakinen, I will have to give it a try.
I am new to this whole thing and was able to accomplish what I what in an extremely inefficient manner (shown below).
Thanks for giving me a template to work off of.
string s = null
Object o = obj
string oh = o."Object Heading"
Object po = parent o
int L = level(Object o)
string isReq = o."Requirement"
if (isReq == "True")
{
if (L == 2)
{
s = probeRichAttr_(o,"Object Number", false)
displayRich s
}
if(L ==3)
{
s = probeRichAttr_(parent o,"Object Number", false)
displayRich s
}
if(L ==4)
{
s = probeRichAttr_(parent parent o,"Object Number", false)
displayRich s
}
if(L ==5)
{
s = probeRichAttr_(parent parent parent o,"Object Number", false)
displayRich s
}
}
|
Re: DXL attribute that returns "Object Level" = 2
bla bla bla
-Louie |